package com.joven.shelltest.utils.obersever;

/**
 * @Author wzj
 * @Date 2023-09-19 10:11
 **/
public class ObserveTest {
    public static void main(String[] args) {
        WeatherData data = new WeatherData();
        CurrentConditions observer1 = new CurrentConditions();
        ThirdPartyConditions observer2 = new ThirdPartyConditions();
        data.registerObserver(observer1);
        data.registerObserver(observer2);
        data.setData(42.5f, 68.2f, 34f);
        System.out.println("=====================天气变化========================");
        data.setData(24.5f, 40.1f, 30f);
    }
}
